//
//  MVTableViewCell.m
//  UI_23_QQ_音乐界面
//
//  Created by li cheng on 16/8/15.
//  Copyright © 2016年 li cheng. All rights reserved.
//

#import "MVTableViewCell.h"
#import "MVTableList.h"
#import "MVCollectionViewCell.h"
#import "MVModel.h"
@interface MVTableViewCell()<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
@property (weak, nonatomic) IBOutlet UICollectionView *MVCollectionView;
@property (nonatomic, strong) MVModel *mvModel;
@end
@implementation MVTableViewCell
#pragma mark - 悬浮

#pragma mark - itemSize
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
    if (indexPath.row == 0) {
        return CGSizeMake(CGRectGetWidth(collectionView.bounds), CGRectGetHeight(collectionView.bounds) / 2 - 15);
    } else {
        
        return CGSizeMake( (CGRectGetWidth(collectionView.bounds) - 5) / 2, CGRectGetHeight(collectionView.bounds) / 4);
    }
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
    return _array.count;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
//    _MVCollectionView
    MVCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"MVCollectionViewCell" forIndexPath:indexPath];
    cell.mvList= _array[indexPath.item];
    return cell;
}

/** 返回区标题 */
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
    
    return @"sdb ja";
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
